package com.njlime.cms.repository.sys;

import com.njlime.cms.entities.MaterialsImageGroup;
import com.njlime.cms.entities.MaterialsVoiceGroup;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;
import java.util.Map;

/**
 * Created by Dean on 2017-7-27.
 */
public interface MaterialVoiceGroupDao extends JpaRepository<MaterialsVoiceGroup, Integer>,JpaSpecificationExecutor<MaterialsVoiceGroup> {

    public List<MaterialsVoiceGroup> list(int unitId);

    public Map getSumMember(int unitId);


    /**
     * 减少分组下的数量
     * @param imageGroupId
     */
    public void downCount(Integer imageGroupId, int unitId);
    /**
     * 增加分组下的数量
     * @param imageGroupId
     */
  void upCount(Integer imageGroupId, int unitId);


    public void editGroup(String id, String name, int unitId);
    public void deleteGroup(String id, int unitId);
}
